package com.hanzidong.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.hanzidong.bean.Article;
import com.hanzidong.bean.Collect;
import com.hanzidong.bean.Comments;
import com.hanzidong.bean.Link;
import com.hanzidong.bean.User;

public interface ArticleMapper {

	boolean add(Article article);

	List<Article> listByUser(User user);

	Article getDetailById(@Param("id")Integer id);

	List<Article> list(Article article);

	boolean update(Article article);

	List<Article> listByHits(Article article);

	List getCommentsByArticleId(Integer id);
	
	boolean addComments(Comments comments);

	boolean addCollect(Collect collect);

	boolean delCollect(Collect collect);

	List<Collect> getCollect(User user);

	Collect getCollectByArticleId(Collect collect);

	List<Link> getLinks();

}
